<?php
	function db_connect($db_name,$acc_user, $acc_pwd)
	{				
		$c =new PDO('mysql:host='.$db_name.';dbname=mysql',$acc_user , $acc_pwd);

		return $c;
	}
	
	function db_connect_ses($base)
	{
		$c =new PDO('mysql:host='.$_SESSION['db_name'].';dbname='.$base,$_SESSION['db_user'] , $_SESSION['db_pass']);
		
		return $c;
	}
?>